package com.ruoyi.xxljob.core.biz.client;

import com.ruoyi.xxljob.core.biz.AdminBiz;
import com.ruoyi.xxljob.core.biz.model.HandleCallbackParam;
import com.ruoyi.xxljob.core.biz.model.RegistryParam;
import com.ruoyi.xxljob.core.biz.model.ReturnT;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;

@FeignClient("ruoyi-xxl-job-admin")
@Service
public interface AdminClient extends AdminBiz {

    @Override
    @RequestMapping(value = "/api/callback", method = RequestMethod.POST)
    public ReturnT<String> callback(@RequestBody List<HandleCallbackParam> callbackParamList);

    @Override
    @RequestMapping(value = "/api/registry", method = RequestMethod.POST)
    public ReturnT<String> registry(@RequestBody RegistryParam registryParam);

    @Override
    @RequestMapping(value = "/api/registryRemove", method = RequestMethod.POST)
    public ReturnT<String> registryRemove(@RequestBody RegistryParam registryParam);
}
